package com.test.ssm.service;

import com.test.ssm.pojo.Flight;
import com.test.ssm.pojo.Ticket;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;
import java.util.List;

@FeignClient(value = "FLIGHT-PROVIDER")
public interface FlightService {
    @RequestMapping("/flights")
    List<Flight> getFlights(@RequestParam("time") String time, @RequestParam("off") String off, @RequestParam( "arrive") String arrive);

    @RequestMapping("/ticket")
    List<Ticket> getTicketByFlightId(@RequestParam("flightId") Integer flightId);
}
